<script setup lang="ts">
import { ref, computed } from 'vue'
import {NCard, NDataTable, NTag } from 'naive-ui'
import { useRouter } from 'vue-router';
const router = useRouter()
// defineProps<{
//   msg: string
// }>()

// 参数
const props = withDefaults(defineProps<{
    //标题
    // title: string;
    // 表头部数据
    columns: any[];
    // 表数据
    data: any[];
    //分页
    pagination?: Object | boolean;
    //表格内容的最大高度
    maxHeight?: number | string;
    //表格内容的最大高度
    bordered?: boolean;
    //斑马线条纹
    striped?: boolean;

    virtualScroll?: boolean;





    // 主题：default默认主题 dark深色主题
    // theme?: "default" | "dark";
}>(), {
    // theme: "default",
    bordered: true,
    striped:false,
    virtualScroll:false,
    pagination:false
});


const emit = defineEmits<{
    // 关闭事件
    (e: "closed"): void;
}>();



// function liClick(params: any) {
//     console.log(params);

// }

function handleClose(params: any) {
    router.replace({path:"/"})

}


</script>
<template>
    <!-- <n-card :title="title" style="height: 100%;" closable @close="handleClose"> -->
    <!-- <div class="table_container"> -->
        <!-- <div class="table_title" style="">
            <div>{{ title }}</div>
            <div>
                <slot></slot>
            </div>
        </div> -->
        <n-data-table :columns="columns" :max-height="maxHeight"  :data="data" :pagination="false"   virtual-scroll />
    <!-- </div> -->
    <!-- </n-card> -->
</template>
<style src="./index.scss"></style>
